package com.cherrypt.api.core.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cherrypt.api.model.dataobject.PostInfo;
import org.apache.ibatis.annotations.Select;

public interface PostInfoDao extends BaseMapper<PostInfo> {
    @Select(value = "SELECT rating_average, rating_num_raters, summary, image FROM t_post_info WHERE info_id = #{infoId}")
    PostInfo getSummaryByInfoId(long infoId);


    @Select(value = "SELECT content FROM t_post_info WHERE info_id = #{infoId}")
    PostInfo getByInfoId(long infoId);
}
